package be.jabapage.snooker.jdo.administration;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import lombok.Data;
import lombok.EqualsAndHashCode;

@PersistenceCapable(detachable = "true")

@Data
@EqualsAndHashCode(exclude = {"highestBreak"})
public class Player implements Serializable {
	private static final long serialVersionUID = 1L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;


	@Persistent
	private String number;

	@Persistent
	private String name;

	@Persistent
	private String firstName;

	@Persistent
	private Date birthDate;

	@Persistent
	private Double highestBreak;

	@Persistent
	private Long clubId;

	@Persistent
	private Long teamId;

	@Persistent
	private boolean referee;

	@Persistent
	private char refereeDegree;
}
